<table cellpadding="0" cellspacing="0" width="100%" align="left" class="table-list">
    <col width="75%">
    <col width="25%">
        <tr class="alt">
            <td>
                <ul class="ul-list-order">
                    <li class="list-order-header">Họ tên</li>
                    <li><?php echo $aryOrderDetail['order_detail_full_name'];?></li>

                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Địa chỉ</li>
                    <li><?php echo $aryOrderDetail['order_detail_address'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Điện thoại</li>
                    <li><?php echo $aryOrderDetail['order_detail_phone_number'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Email</li>
                    <li><?php echo $aryOrderDetail['order_detail_email'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Tên công ty</li>
                    <li><?php echo $aryOrderDetail['order_detail_company_name'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Địa chỉ công ty</li>
                    <li><?php echo $aryOrderDetail['order_detail_company_address'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Mã số thuế</li>
                    <li><?php echo $aryOrderDetail['order_detail_company_tax_code'];?></li>
                </ul>
                <ul class="ul-list-order">
                    <li class="list-order-header">Địa chỉ giao hàng</li>
                    <li><?php echo $aryOrderDetail['order_detail_address_delivery'];?></li>
                </ul>
            </td>
            <td>
                <div>Ngày gửi: <?php echo date('d/m/Y', strtotime($aryOrderDetail['order_detail_created_date']));?></div>
                <div>
                    Trạng thái: <?php if($aryOrderDetail['order_detail_is_process'] == 0){?>
                                    Chưa xử lý
                                <?php }else if($aryOrderDetail['order_detail_is_process'] == 1){ ?>
                                    Đã xử lý
                                <?php }else{?>
                                    Đang chờ xử lý
                                <?php } ?>
                </div>
                <?php if($aryOrderDetail['order_detail_process_date'] != '' && $aryOrderDetail['order_detail_process_date'] != '0000-00-00 00:00:00'){?>
                    <div>
                        Ngày cập nhật: <?php echo date('d/m/Y', strtotime($aryOrderDetail['order_detail_process_date']));?>
                    </div>
                <?php } ?>
            </td>
        </tr>
        
</table>
<table cellpadding="0" cellspacing="0" width="100%" align="left" class="table-list">
    <tr class="alt">
            <td colspan="5">
                <div style="font-weight: bold;">
                    Danh sách sản phẩm
                </div>
            </td>
        </tr>
        <tr class="alt">
            <td width="20%" class="order_product_title">
                Danh mục
            </td>
            <td width="38%" class="order_product_title">
                Sản phẩm
            </td>
            <td width="12%" class="order_product_title" align="right">
                Số lượng
            </td>
            <td width="15%" class="order_product_title" align="right">
                Đơn giá(VNĐ)
            </td>
            <td width="15%" class="order_product_title" align="right">
                Thành tiền
            </td>
        </tr>
        <?php $totalPrice = 0; foreach ($aryProductOrder as $key => $value) { $totalPrice = $totalPrice+$value['product_order_total_price'];?>
        <tr class="alt">
            <td>
                <?php echo $value['product_order_category_name'];?>
            </td>
            <td>
                <?php echo $value['product_order_product_name'];?>
            </td>
            <td align="right">
                <?php echo $value['product_order_total_product'];?>
            </td>
            <td align="right">
                <?php echo number_format($value['product_order_product_price'], 0, ',', '.');?>
            </td>
            <td align="right">
                <?php echo number_format($value['product_order_total_price'], 0, ',', '.');?>
            </td>
        </tr>
        <?php } ?>
        <tr class="alt">
            <td colspan="5" align="right">
                <div><span>Tổng số tiền:</span><span style="padding-left: 10px;"><?php echo number_format($totalPrice, 0, ',', '.');?>(VNĐ)</span></div>
            </td>
        </tr>
        <tr>
            <td>
                Ghi chú
            </td>
            <td colspan="2">
                <textarea cols="60" rows="10" id="order_detail_comment" name="order_detail_comment" class="text_order_comment"><?php echo $aryOrderDetail['order_detail_comment'];?></textarea>
            </td>
            <td colspan="2">
                <?php if($aryOrderDetail['order_detail_is_process'] == 0 || $aryOrderDetail['order_detail_is_process'] == 2){?>
                    <input type="button" class="submit cpointer" value="Xủ lý sau" onclick="AdminController.updateStatusOrder(2, <?php echo $aryOrderDetail['order_detail_id'];?>);">
                    <input type="button" class="submit cpointer" value="Hoàn thành" onclick="AdminController.updateStatusOrder(1, <?php echo $aryOrderDetail['order_detail_id'];?>);">
                    <input type="button" class="submit cpointer" value="Xóa" onclick="AdminController.deleteOrder(<?php echo $aryOrderDetail['order_detail_id'];?>);">
                <?php } ?>
                <?php if($aryOrderDetail['order_detail_is_process'] == 1){?>
                    <div class="order_is_proces">Đơn hàng đã được xử lý</div>
                        <input type="button" class="submit cpointer" value="Khôi phục" onclick="AdminController.updateStatusOrder(0, <?php echo $aryOrderDetail['order_detail_id'];?>);">
                        <input type="button" class="submit cpointer" value="Cập nhật" onclick="AdminController.updateStatusOrder(1, <?php echo $aryOrderDetail['order_detail_id'];?>);">
                <?php } ?>
            </td>
        </tr>
</table>